home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2005 March / Macworld CD March 2005 - Marathon Trilogy.iso / Shareware World / Text Processing / HexEdit Release.sit / HexEdit Release / Project / Source / Prefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-10-30  |  2.6 KB  |  86 lines  |  [TEXT/CWIE]

  1. /*
  2.  * The contents of this file are subject to the Mozilla Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/MPL/
  6.  * 
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  * 
  12.  * The Original Code is Copyright 1993 Jim Bumgardner.
  13.  * 
  14.  * The Initial Developer of the Original Code is Jim Bumgardner
  15.  * Portions created by Lane Roathe are
  16.  * Copyright (C) Copyright © 1996-2002.
  17.  * All Rights Reserved.
  18.  *
  19.  * Modified: $Date: 2004/09/08 21:54:26 $
  20.  * Revision: $Id: Prefs.h,v 1.13 2004/09/08 21:54:26 raving Exp $
  21.  *
  22.  * Contributor(s):
  23.  *        Lane Roathe
  24.  *        Nick Shanks
  25.  */
  26.  
  27. #ifndef _HexEdit_Preferences_
  28. #define _HexEdit_Preferences_
  29.  
  30. #include "HexEdit.h"
  31.  
  32. #define    kPrefCreatorType    FOUR_CHAR_CODE('hDmp')
  33. #define    kPrefFileType        FOUR_CHAR_CODE('BINA')
  34.  
  35. #define    kPrefsStringsID        strFiles
  36. #define    kPrefsFolderIndex    FN_PrefsFolder
  37. #define    kPrefsFileNameIndex    FN_PrefsFile
  38.  
  39. // LR: preferences structure
  40. #define PREFS_VERSION    0x0209
  41.  
  42. typedef struct
  43. {
  44.     short    csResID;        // resource ID of default color table
  45.     short    csMenuID;        // 1.65 don't double use version!
  46.     
  47.     short    searchMode,        // Hex or ASCII searches
  48.             searchForward,    // false = backward
  49.             searchCase,        // true = match case
  50.             searchSize,        // byte, short or long
  51.             searchType;        // Find matches or differences
  52.  
  53.     short    asciiMode;        // show high bit ascii chars (or substitute '.')?
  54.     short    gotoMode;        // hex or dec
  55.     short    decimalAddr;    // display numbers in windows as decimal or hex?
  56.     short    overwrite;        // insert or overwrite editing?
  57.     short    backupFlag;        // from original (moved in 1.5)
  58.     short    vertBars;        // use David Emme's vertical bars
  59.     short    constrainSize;    // resizing allows partial lines?
  60.     short    formatCopies;    // format copies (spaces, tabs - false == raw data)
  61.     short    nonDestructive;    // in overwrite mode, Detete is non-destructive (## -> 00)
  62.     short    moveOnlyPaging;    // page up/down only move display, not selection point
  63.  
  64.     short    useColor;        // true if we are using color windows
  65.  
  66.     short    wrapFinds;        //LR 190 -- true to wrap finds when reaching end/beg of file
  67.  
  68.     // spare prefs entries so version file can be updated
  69.     // w/o reseting prefs a few times :)
  70.     // NOTE: these default to FALSE in case they ever become used!
  71.     short    spare2;
  72.     short    spare3;
  73.     short    spare4;
  74.  
  75.     short    version;        // version # of gPrefs record
  76.  
  77. }    prefs_t, *prefsPtr;
  78.  
  79. extern prefs_t gPrefs;
  80.  
  81. // --- Prototypes ---
  82.  
  83. Boolean PrefsSave( void );
  84. Boolean PrefsLoad( void );
  85.  
  86. #endif